<?php

class XthemeBlueprint
{
    protected $_models;
    protected $_showHead = true;
    protected $_showFooter = true;
    protected $_listCount = 10;
    protected $_pageCount = 5;

    function __construct( $models )
    {
        $this->_models = $models;
    }

    public function setShowHead( $boolean=true )
    { 
        $this->_showHead = $boolean; 
    }
    public function setShowFooter( $boolean=true )
    { 
        $this->_showFooter = $boolean; 
    }

    public function setListCount( $int )
    { 
        $this->_listCount = (int) $int; 
    }
    public function setPageCount( $int )
    { 
        $this->_pageCount = (int) $int; 
    }

    public function generate()
    {
        if( $this->_models && $this->_models[0] ) {
            $form = $this->_models[0]->getForm();
        }
        $show = '';

/*
echo '<pre style="background-color:#def;color:#000;text-align:left;font-size:10px;font-family:dina,GulimChe;">';
print_r($form->getFormSetting());
echo "</pre>\n";
*/

        foreach( $this->_models as $model ) {
            echo '<div class="column span-24 last">';
            echo '    <div class="column span-4 ">'.        $model->getId()                                      .'</div>';
            echo '    <div class="column span-3 ">'.        $model->getAccount()                                 .'</div>';
            echo '    <div class="column span-2 ">'.        $model->getStatus()                                  .'</div>';
            echo '    <div class="column span-5 ">'.        $model->getCreateDateByManager()->getTimeByFormat()  .'</div>';
            echo '    <div class="column span-10 last">'.   $model->getEmail()                                   .'</div>';
            echo '</div>';
        }

        return $show;
    }


    
}








